// 自定义按钮权限指令
import pinia, { useUserStore } from '@/stores'
const userStore = useUserStore(pinia)
const isHasBtn = (value: any, el: any) => {
  if (!userStore.buttons.includes(value) && el) {
       el.parentNode?.removeChild(el)
  }
}


export default {
  install(app: any) {
    app.directive('Btn', {
      mounted(el: any, binding: any) {
      isHasBtn(binding.value,el)
      },
    })
  },
}


// 使用 v-Btn="``"
